<?php

//ini_set('include_path', ini_get('include_path') 
//                        . PATH_SEPARATOR . './library/'
//                        . PATH_SEPARATOR . './library/Purifier/'
//                        . PATH_SEPARATOR . './modules/'
//                        );
//                        

//Define path to application directory
defined('ROOT_PATH')
    || define('ROOT_PATH', realpath(dirname(__FILE__) . '/../'));

// Define application environment
//defined('APPLICATION_ENV')
//    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

    
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(ROOT_PATH . '/library'),
    realpath(ROOT_PATH . '/library/Purifier'),
    realpath(ROOT_PATH . '/modules'),
    get_include_path(),
)));

//var_dump (get_include_path());die();
ini_set("memory_limit","512M");

require '../library/common.php';
require '../Bootstrap.php';


//TODO : To be removed
//ini_set('xdebug.profiler_enable',1);
//ini_set('xdebug.profiler_output_dir',"/var/www/hvn/logs/xdebug");
//ini_set('xdebug.profiler_output_name', 'timestamp');

//ini_set('display_errors', 'On');
//ini_set('xdebug.show_local_vars',1);


//ini_set('xdebug.auto_trace', 'On');
//ini_set('xdebug.trace_output_dir',"/var/www/hvn/logs/xdebug/trace");

//ini_set('xdebug.show_mem_delta', 1);
//ini_set('xdebug.var_display_max_data', 1024); //default 512 

//xdebug_start_trace('/var/www/xdebug/trace');
//Bootstrap::test();

Bootstrap::run();
//xdebug_stop_trace();
//exit();